<!DOCTYPE html>

<html>
    <head>
        <title>Administrator Login</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="css/bootstrap.min.css"/>
        <link rel="stylesheet" href="css/style.css"/>
        <link rel="stylesheet" href="css/newcss1.css"/>       
    </head>
    
    <body id="bg">
        <button style="margin-top: 20px;margin-left: 50px; color: #ffffff;background-color: #0099cc;  width: 80px; height: 30px; border-radius: 8px;" >返回首页</button>
        <br>
        <br>
        <br>
        <div class="container padding20 text-center cetDiv" style="background-color:white;width: 420px;height: 350px;margin-top: 50px;border-radius: 20px;">
            <div style="margin-left: 1px"><h1 style="font-size: 25px; font-weight: bold;color:#ff9933">管理员登录</h1></div>
            <hr><br> 
            
            <form action="al" class="form-inline" method="post" onsubmit="return alogin();">
                
                
                    <input id="inputID" name="Aid" type="text" class="form-control"  placeholder="管理员账号" style="width: 300px; height: 35px; " >
                
                    
                    <br><br>
                
                    <input id="inputPwd" name="Apwd" type="password" class="form-control " placeholder="请输入登录密码" style=" margin-top: 10px; width: 300px; height: 35px; ">
              
                <br><br> 
                <button type="submit" class="btn" id="login" style=" margin-top: 30px;color:#ffffff; background-color: #ff9933;  font-size: 18px; width:300px; height: 35px; border: 40px;">登录</button>
            </form>
            <script>
                function alogin(){
                   var a = document.getElementById("inputID").value;
                   var b = document.getElementById("inputPwd").value;
                   var pattern = /^[0-9a-zA-Z]{1,5}$/;                 
                    if(pattern.test(a)){
                    }else{
                        if(a==''){
                            alert("請輸入管理員賬號");
                            return false;
                        }
                        else
                        {
                            alert("請輸入正確格式");
                            return false; 
                        }
                        if(b==''){
                            alert("請輸入密碼");
                            return false;
                        }
                        
                   }
            }
            </script>
        </div>
    </body>
</html>